Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optoe's write_max when using native i2c driver #407

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

prgeor
Copy link
Contributor

@prgeor prgeor commented Jun 18, 2024

Optoe driver with write-max > 1 when using the i2c message buffer was allocating only 3(1+2) bytes which means while copying the user data for i2c adapters supporting the native i2c functions will overwrite the message buffer size. This will not happen for i2c adapters that does not support native i2c functions like pure SMBUS controller.

MSFT ADO - 28209032

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@bingwang-ms please include this fix in 202405

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@StormLiangMS please include this fix in 202311

@prgeor
Copy link
Contributor Author

prgeor commented Jun 18, 2024

@lguohan please review/merge. thanks.

}

- dev_dbg(&client->dev, "dev_class: %d\n", optoe->dev_class);
+ dev_dbg(&client->dev, "dev_class: %d use_smbus=%d\n", optoe->dev_class, use_smbus);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to having use_smbus be logged?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prgeor yes the crash is seen on platform using smbus driver so will be good to know the smbus usage in the debug log

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

Cherry-pick PR to 202411: #456

@r12f
Copy link

r12f commented Jan 28, 2025

thanks Mihir and this one is already merged with 202411 -> 202412 code sync: Azure/sonic-linux-kernel.msft@f3f9a37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants